FROM python:3.9
# RUN sed -i "s/archive.ubuntu./mirrors.aliyun./g" /etc/apt/sources.list
# RUN sed -i "s/deb.debian.org/mirrors.aliyun.com/g" /etc/apt/sources.list
# RUN sed -i "s/security.debian.org/mirrors.aliyun.com\/debian-security/g" /etc/apt/sources.list
# RUN sed -i "s/httpredir.debian.org/mirrors.aliyun.com\/debian-security/g" /etc/apt/sources.list


COPY requirement.txt /root/

# ADD ta-lib-0.4.0-src.tar.gz /root/

#Set 设置中文支持，和时区为东八区
RUN apt update && \
apt install vim -y && \
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r /root/requirement.txt && \
mkdir /root/trade/
#rm /etc/localtime && \
#cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

ENV LANG zh_CN.utf8
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

WORKDIR /root/trade/
